<template>
	<view class="login">
		<image class="logo" src="../../static/logo.jpg"></image>
		<view class="login-title">和兴汽车玻璃</view>
		<view class="login-title1">登录后，可查看更多信息</view>
		
		
		<view class="login-buttom" @click="login()">一键登录</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url : ''
			}
		},
		onLoad(e) {
			
			this.url  = e.url;
			console.log(this.url);
			if(e.token){
				uni.setStorageSync("token",e.token);
				uni.redirectTo({
				  url: this.url
				});
			}
		},
		methods: {
			login(){
				var url = "http://hexingv2.kpg888.top/api/index/login?url="+this.url;
				window.location.href=url;
				return;
			}
		}
	}
</script>

<style>
	.login {
		margin-top: 250rpx;
		color: #333;
	}
	.logo {
		width: 340rpx;
		height: 140rpx;
		display: block;
		margin: auto;
	}
	.login-title {
		text-align: center;
		padding-top: 20rpx;
		font-size: 40rpx;
		font-weight: bold;
	}
	.login-title1 {
		text-align: center;
		padding-top: 20rpx;
		color: #343333;
	}
	.login-buttom {
		width: 610rpx;
		line-height: 100rpx;
		background-color: #00ca74;
		margin: auto;
		margin-top: 10%;
		text-align: center;
		border-radius: 50rpx;
		color: #fff;
	}
</style>
